﻿@page
@{ Layout = "_Layout"; }

<el-alert type="error">此操作将审核以下 <strong> {{ contents.length }} </strong> 篇内容，确定吗？</el-alert>

<el-table
  :data="contents"
  style="width: 100%;"
  size="small"
  row-key="id"
  stripe>
  <el-table-column prop="id" label="内容Id" width="80"></el-table-column>
  <el-table-column
    label="内容标题"
    show-overflow-tooltip>
    <template slot-scope="scope">
      <el-link type="primary" :underline="false" :href="getContentUrl(scope.row)" v-html="scope.row.title" target="_blank" v-on:click.stop.native></el-link>
    </template>
  </el-table-column>
  <el-table-column prop="addDate" label="添加时间"  width="150"></el-table-column>
  <el-table-column
    fixed="right"
    width="90"
    align="center"
    show-overflow-tooltip
    label="状态">
    <template slot-scope="scope">
      <el-link size="mini" :underline="false" :type="(scope.row.checked ? 'primary' : 'danger')">
        {{ scope.row.checked ? '已审核' : '待审核' }}
      </el-link>
    </template>
  </el-table-column>
</el-table>

<el-divider></el-divider>
<div style="height: 10px"></div>

<el-form v-on:submit.native.prevent size="small" ref="form" :model="form" label-width="120px">
  <el-form-item label="审核状态" prop="checkedLevel" :rules="{ required: true, message: '请选择审核状态' }">
    <el-select v-model="form.checkedLevel">
      <el-option v-for="level in checkedLevels" :value="level.value" :label="level.label"></el-option>
    </el-select>
  </el-form-item>
  <el-form-item label="审核原因" prop="reasons">
    <el-input v-model="form.reasons" type="textarea"></el-input>
  </el-form-item>
  <el-form-item label="审核后转移">
    <el-radio v-model="form.isTranslate" :label="false">不转移</el-radio>
    <el-radio v-model="form.isTranslate" :label="true">转移</el-radio>
  </el-form-item>
  <el-form-item v-if="form.isTranslate" label="转移到站点" prop="transSiteIds" :rules="{ required: true, message: '请选择转移到的站点' }">
    <el-cascader
      v-model="form.transSiteIds"
      :options="transSites"
      :props="{ checkStrictly: true }"
      :multiple="false"
      v-on:change="handleTransSiteIdChange"
      filterable
      placeholder="请选择站点">
    </el-cascader>
  </el-form-item>
  <el-form-item v-if="form.isTranslate && transChannels" label="转移到栏目" prop="transChannelIds" :rules="{ required: true, message: '请选择转移到的栏目' }">
    <el-cascader
      v-model="form.transChannelIds"
      :options="transChannels"
      :props="{ checkStrictly: true }"
      filterable 
      placeholder="请选择栏目">
    </el-cascader>
  </el-form-item>
</el-form>

<el-divider></el-divider>
<el-row align="right" style="margin-right: 5px; margin-top: 10px;">
  <el-col :span="24" align="right">
    <el-button size="small" type="primary" v-on:click="btnSubmitClick">确 定</el-button>
    <el-button size="small" v-on:click="btnCancelClick">取 消</el-button>
  </el-col>
</el-row>

@section Scripts{
<script src="/sitefiles/assets/js/admin/cms/contentsLayerCheck.js" type="text/javascript"></script> }